import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'

import toast from 'components/common/toast'

// 解决移动端300延迟
import  FastClick  from 'fastclick'

import VueLazyload from 'vue-lazyload'

Vue.config.productionTip = false

Vue.prototype.$bus = new Vue() // 事件总线
// 1. 安装toast插件
Vue.use(toast)

// 2. 解决移动端300延迟
FastClick.attach(document.body)

// 3. 使用懒加载的插件
Vue.use(VueLazyload, {
  loading: require('assets/img/common/loading.webp')
})

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
